There are many applications for a non-volatile, non-decreasing counter in electronic devices. For example, such a counter may be used to count the number of times an integrated circuit (IC) device powers on, as an anti-counterfeit measure in a print cartridge to count the number of prints, for security checks, or for avoiding counter roll-back attacks. As the use of non-volatile memory, such as electrically erasable programmable read-only memory (EEPROM), increases in electronic devices, implementing a non-volatile, non-decreasing counter in non-volatile memory becomes desirable.
One solution for implementing a counter using non-volatile memory is to implement a binary counter that stores its value in memory cells. However, memory cells in certain types of non-volatile memory may wear out and become unreliable after a number of program cycles have been performed. In situations with very large counts, the number of program cycles that can be performed before a memory cell wears out and becomes unreliable can be a limiting factor. Typically, the memory cell storing the least significant bit will be programmed or erased for each count, which will cause the memory cell storing the least significant bit to wear out or become unreliable sooner than other memory cells in the non-volatile memory. Thus, a counter using a type of non-volatile memory in which memory cells may wear out and become unreliable typically cannot count higher than the number of program cycles that can be performed on the memory cell in which the least significant bit is stored or else the count may become corrupted.